<?php 
use yii\helpers\Html;
use yii\widgets\LinkPager;
use yii\helpers\Url;
?>


<div class="table_kj">
	<?php if(empty($data)){?>
	<table class="table table-bordered">
		<thead>
		<tr>
			<td style="text-align:center">类型</td>
			<td style="text-align:center">日期</td>
			<td style="text-align:center">货款</td>
			<td style="text-align:center">赠送</td>
			<td style="text-align:center">变化后货款</td>
			<td style="text-align:center">变化后赠送</td>
			<td style="text-align:center">记录</td>
		</tr>
		</thead>
		<tbody>
		<tr>
			<td colspan="7" align="center"><img src="<?=Yii::getAlias('@web/backend/img/nodata.gif');?>"></td>
		</tr>
		</tbody>
	</table>
	<?php }else{?>
	<table  class="table table-bordered">
		<tr>
			<td style="text-align:center">类型</td>
			<td style="text-align:center">日期</td>
			<td style="text-align:center">货款</td>
			<td style="text-align:center">赠送</td>
			<td style="text-align:center">变化后货款</td>
			<td style="text-align:center">变化后赠送</td>
			<td style="text-align:center">记录</td>
		</tr>
		<?php foreach ($data as $d) {?>
		<tr>
			<td class="center"><?=Html::encode($d['finance_type'])?></td>
			<td class="center"><?=Html::encode(substr($d['create_date'],0,10))?></td>
			<td class="center">
			<?php if($d['finance_type'] == '扣款' && $d['finance_money'] > 0){?>-<?php }?>
			<?=Html::encode($d['finance_money'])?>
			</td>
			<td class="center">
			<?php if($d['finance_type'] == '扣款' && $d['finance_give_money'] > 0){?>-<?php }?>
			<?=Html::encode($d['finance_give_money'])?>
			</td>
			<td class="center"><?=Html::encode($d['finance_balance'])?></td>
			<td class="center"><?=Html::encode($d['finance_give_balance'])?></td>
			<td class="center"><?=Html::encode($d['finance_remark'])?></td>
		</tr>
		<?php }?>
	</table>
	<?php }?>
	<div class="page">
<?=LinkPager::widget([
'pagination' => $page,
'firstPageLabel' => '首页',
'nextPageLabel' => '下一页',
'prevPageLabel' => '上一页',
'lastPageLabel' => '末页',
]); ?>
	</div>


</div>

